#include("/template/common/layout/_page_layout.html")
#@layout()

#define css()
<style>

</style>
#end

#define js()
<script type="text/javascript">
    layui.use(['form', 'layer'], function () {
        // 操作对象
        var form = layui.form
            , layer = layui.layer
            , $ = layui.jquery;

        form.on('submit(sub)', function (data) {

            util.sendAjax({
                type: 'POST',
                url: '#(ctxPath)/system/organization/postUpdate',
                data: $('#addForm').serialize(),
                loadFlag: true,
                success: function (data) {
                    pop_close();
                }
            });

            return false; //阻止表单跳转。如果需要表单跳转，去掉这段即可。
        });
    });
</script>
#end

#define content()
<div class="x-body">
    <form id="addForm" class="layui-form" action="">
        <input type="hidden" name="organization.id" value="#(organization.id)">
        <div class="layui-form-item">
            <label class="layui-form-label">组织名称</label>
            <div class="layui-input-block">
                <input type="text" name="organization.name" required lay-verify="required" value="#(organization.name)"
                       placeholder="组织名称" autocomplete="off" class="layui-input" style="width: 500px" >
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">名称全拼</label>
            <div class="layui-input-block">
                <input type="text" name="organization.spell" required lay-verify="required"
                       value="#(organization.spell)" placeholder="名称全拼" autocomplete="off" class="layui-input" style="width: 500px" >
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">组织地址</label>
            <div class="layui-input-block">
                <input type="text" name="organization.addr" required lay-verify="required" value="#(organization.addr)"
                       placeholder="组织地址" autocomplete="off" class="layui-input" style="width: 500px" >
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">机构代码</label>
            <div class="layui-input-block">
                <input type="text" name="organization.code" required lay-verify="required" value="#(organization.code)"
                       placeholder="机构代码" autocomplete="off" class="layui-input" style="width: 500px" >
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">负责人姓名</label>
            <div class="layui-input-block">
                <input type="text" name="organization.principal" required lay-verify="required"
                       value="#(organization.principal)" placeholder="负责人姓名" autocomplete="off" class="layui-input" style="width: 500px" >
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">联系方式</label>
            <div class="layui-input-block">
                <input type="text" name="organization.contact" required lay-verify="required"
                       value="#(organization.contact)" placeholder="联系方式" autocomplete="off" class="layui-input" style="width: 500px" >
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="sub">立即提交</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>
    </form>
</div>
#end